package com.topisv.tms.repository.occupiedArea;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.occupiedArea.StockTypeMapping;

/**
 * 库位类型成本配置_service
 * 
 * @author gh
 * 
 */

public abstract interface StockTypeMappingDao extends PagingAndSortingRepository<StockTypeMapping, Long>, JpaSpecificationExecutor<StockTypeMapping>{
	
	List<StockTypeMapping> findByStockType(String stockType);
	
	@Modifying
	@Query("delete from StockTypeMapping where stockType = ?")
	void deleteByStockType(String stockType);
}
